import axios from "@/setting/axios";
//运动队接口

export function getAllList(path, params) {
  if (path) {
    console.log(`output->getAllList`, path);
    return axios.get(`/common/team/info/${path}`);
  } else if (params) {
    console.log(`output->getAllList`, params);
    return axios.get("/admin/team/info", { params });
  } else {
    return axios.get("/common/team/info");
  }
}

export function getTermslist(params) {
  console.log(`output->getTermslist`, params);
  return axios.get("/common/team/terms", { params });
}

export function getTermsnoids(params) {
  console.log(`output->getTermsnoids`, params);
  return axios.get("/admin/team/noids", { params });
}

// 新增（单个）接口
export function addInfo(data) {
  return axios.put("/admin/team/add", data);
}

// 删除（单个）接口
export function deleteInfo(path) {
  return axios.delete(`/admin/team/${path}`);
}

// 修改（单个）接口
export function updateInfo(params, data) {
  console.log(`output->updateInfo`, params, data);
  return axios.post(`/admin/team/${params}`, data);
}
